<template>
    <div style="width: 100%;height: 100%;">
        <el-header style="height: 7%;width: 100%">
          <h1>教师端</h1>
        </el-header>
        <el-container style="height: 90%;width: 100%">
            <el-aside style="height: 100%;width: 15%">
              <div class="a">
                <div class="center">
                  <img class="cirLogo" src="../../assets/icon/score.png"/>
                </div>
                <div style="padding:0px;width: 100%;height:60px;position: relative;text-align:center">
                  <el-button @click="personCenter" style="width:40%;">个人中心</el-button>
                  <el-button @click="exitAccount" style="width:40%;">退出账号</el-button>
                </div>
              </div>
              <el-menu :default-active="$route.path" router unique-opened="true">
                <el-menu-item index="/teachermainpage"><img style="width: 30px;height: 30px;" src="../../assets/icon/score.png"/>我的首页</el-menu-item>
                <el-submenu index="1">                  
                  <template slot="title"><img style="width: 40px;height: 40px;" src="../../assets/icon/exam.png"/>考试管理</template>
                  <el-menu-item index="/teacherpublishexamination">发布考试</el-menu-item>
                  <el-menu-item index="/teacherexamlist">考试列表</el-menu-item>
                </el-submenu>
                <el-menu-item index="/teacherscoreanalyse"><img style="width: 30px;height: 30px;" src="../../assets/icon/score.png"/>成绩分析</el-menu-item>
                <el-submenu index="2">                  
                  <template slot="title"><img style="width: 35px;height: 35px;" src="../../assets/icon/errSum.png"/>题库管理</template>
                  <el-menu-item index="/teacherquestionlist">题目列表</el-menu-item>
                  <el-menu-item index="/teachercreatetestquestion">创建试题</el-menu-item>
                  <el-menu-item index="/teacherquestionbatchimport">批量导入</el-menu-item>
                  <el-menu-item index="/teacherquestionimportrecord">导入记录</el-menu-item>
                </el-submenu>
                <el-menu-item index="/teacherstudentlist"><img style="width: 30px;height: 30px;" src="../../assets/icon/errSum.png"/>学生列表</el-menu-item>
                <el-submenu index="3">                  
                  <template slot="title"><img style="width: 35px;height: 35px;" src="../../assets/icon/errSum.png"/>帮帮学生</template>
                  <el-menu-item index="/teacherpublishnotice">下达通知</el-menu-item>
                  <el-menu-item index="/teacheruploaddata">上传资料</el-menu-item>
                </el-submenu>
                <el-menu-item index="/community"><img style="width: 30px;height: 30px;" src="../../assets/icon/errSum.png"/>交流社区</el-menu-item>
                </el-menu>
            </el-aside>
            <el-main style="height: 100%;width: 85%">
              <div style="width:100%;height:100%;">
                <router-view></router-view>
              </div>
            </el-main>
        </el-container>
    </div>
</template>

<script>
export default {
    name: 'TeacherInterface',
    data() {
        return {
            value: 'true',
            input: ''
        }
    },
    mounted() {
      this.$router.push('./teachermainpage')
    },
    methods: {
      personCenter() {
        this.$router.push('./teacherlogin')
      },
      exitAccount() {
        this.$router.push('./teacherlogin')
      }      
    }
}
</script>

<style lang="less" scoped>
.el-header {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
}
.el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
}
.el-main {
     background-color: #E9EEF3;
    color: #333;
    text-align: center;
}  
.a {
  display: block;
  width: 100%;
  height:140px;
}
.center {
  display: flex;
  width: 100%;
  height: 60%;
  justify-content: center;
  align-content: center;
  // margin-bottom: 5px;
  margin-top: 5px;
}
.cirLogo {
   width: 60px;
   height:60px;
   background-size:100% 100%;
   margin-top:5px;
   border-radius: 50%;
}
</style>